package com.xncoding.pos.init;

import com.xncoding.pos.service.UserService;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @description:
 * @author: bo
 * @create: 2025-04-07 16:23
 */
@Component
@RequiredArgsConstructor
public class StaticUtils2 {
    private final UserService someService;

    private static StaticUtils2 instance;

    @PostConstruct
    public void registerInstance() {
        instance = this;
    }

    public static void doSomething() {
        instance.someService.getList();
    }
}